﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Services.System
{
    public class MedicationRegisterDto : ModelBase
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 幼儿id
        /// </summary>
        public Guid ChildId { get; set; }

        /// <summary>
        /// 幼儿名字
        /// </summary>
        public string? ChildName { get; set; }

        /// <summary>
        /// 幼儿头像
        /// </summary>
        public Guid? ChildImgId { get; set; }

        /// <summary>
        /// 服药时间
        /// </summary>
        public DateTime MedicationTime { get; set; }

        /// <summary>
        /// 班级
        /// </summary>
        public Guid ClassId { get; set; }

        /// <summary>
        /// 班级名字
        /// </summary>
        public string? ClassName { get; set; }

        /// <summary>
        /// 药物名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string? Explain { get; set; }

        /// <summary>
        /// 家长id
        /// </summary>
        public Guid ParentId { get; set; }

        /// <summary>
        /// 家长名字
        /// </summary>
        public string? ParentName { get; set; }

        /// <summary>
        /// 家属关系
        /// </summary>
        public int? Relationship { get; set; }

        /// <summary>
        /// 关系Str
        /// </summary>
        public string RelationshipStr { get { return EnumHelper.GetDescriptionContent((EnumParentRelationship)Relationship.Value); } }

        /// <summary>
        /// 状态
        /// </summary>
        public EnumMedicationRegisterState State { get; set; }

        /// <summary>
        /// 状态Str
        /// </summary>
        public string StateStr { get { return EnumHelper.GetDescriptionContent(State); } }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 驳回理由
        /// </summary>
        public string? RejectReason { get; set; }

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<MedicationRegister, MedicationRegisterDto>();

            profile.CreateMap<MedicationRegisterDto, MedicationRegisterExtendDto>();

        }
    }

    public class MedicationRegisterExtendDto : MedicationRegisterDto
    {
        /// <summary>
        /// 药品图片
        /// </summary>
        public List<MedicationRegisterImage>? DrugsImage { get; set; }

        /// <summary>
        /// 签名图片
        /// </summary>
        public string? AutographImg { get; set; }

        /// <summary>
        /// 记录
        /// </summary>
        public List<string>? RecodeList { get; set; }
    }
}
